package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Advertise对象",description = "首页轮播广告表")
public class Advertise extends BaseEntity {

    private static final long serialVersionUID = -9151939333589263076L;

    @ApiModelProperty("主键")
    private Integer id;

    @ApiModelProperty("轮播位置")
    @NotNull(message = "轮播位置不能为空")
    private String  type;

    @ApiModelProperty("链接地址")
    @NotBlank(message = "链接地址不能为空")
    private String url;

    @ApiModelProperty("标题")
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty("图片地址")
    @NotBlank(message = "图片地址不能为空")
    private String pic;

    @ApiModelProperty("图片宽度")
    @NotNull(message = "图片宽度不能为空")
    private Integer width;

    @ApiModelProperty("图片高度")
    @NotNull(message = "图片高度不能为空")
    private Integer height;

    @ApiModelProperty("状态")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @ApiModelProperty("创建时间 默认系统当前时间")
    private Date createTime;

}
